<template>
	<view>
		<!-- 顶部导航 -->
		<u-navbar :background="background">
			<view class="ft_16 fw-b">
				设置
			</view>
		</u-navbar>
		<view class="content">
			<view class="con_2 card">
				<view class="display just_space otherbtn" @click="feedback">
					<view class="">意见反馈</view>
					<u-icon name="arrow-right" color="#999999" size="28"></u-icon>
				</view>
				<view class="display just_space" style="padding: 15px 0;" @click="serviceTK()">
					<view class="">服务条款</view>
					<u-icon name="arrow-right" color="#999999" size="28"></u-icon>
				</view>
			</view>
			<view class="con_2 card">
				<view class="display just_space otherbtn" @click="aboutus()">
					<view class="">关于我们</view>
					<u-icon name="arrow-right" color="#999999" size="28"></u-icon>
				</view>
				<!-- <view class="display just_space" style="padding: 15px 0;">
					<view class="">消息推送</view>
					<u-switch v-model="checked" size='30' @change="is_push" active-color="#ea8a20"></u-switch>
				</view> -->
			</view>
			
			<view class="submitBtn" @click="signOut()">
				退出当前登录
			</view>
			<view class="ft_12 c-999" style="text-align: center;line-height: 1.8em;position: fixed;bottom: 50px;left: 50%;transform: translate(-50%,-50%);width: 100%;">
				<view class="">
					Copyright©2021
				</view>
				<view class="">
					山东汇彩信息技术有限公司&汇彩惠品
					<!-- 山东冠普空调设备有限公司&通风招工 -->
				</view>
			</view>
			
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				background:{backgroundColor: '#ffffff',}, //导航栏背景
				checked:true, //消息推送
				
			}
		},
		methods: {
			feedback(){ //意见反馈
				uni.navigateTo({
					url:"Feedback"
				})
			},
			serviceTK(){ //服务条款
				uni.navigateTo({
					url:"aboutUs?type="+2
				})
			},
			aboutus(){ //关于我们
				uni.navigateTo({
					url:"aboutUs?type="+1
				})
			},
			is_push(e){ //是否消息推送
				console.log(e);
			},
			signOut(){ //退出登录
				this.$myRequest('user/logout',{})
				.then(res=>{
					console.log(res.data);
					this.$all.toast(res.data.msg)
					if(res.data.code==1){
						setTimeout(()=>{
							uni.clearStorageSync() //清除缓存
							// #ifndef MP-WEIXIN
							uni.reLaunch({
								url:"../../../login/login1"
							})
							// #endif
							// #ifdef MP-WEIXIN
							uni.reLaunch({
								url:"../../../login/login"
							})
							// #endif
						},800)
					}
				})
				
			},
			
		}
	}
</script>

<style lang="scss">
page{
	background-color: #fafafa;
}
.content{
	padding-top: 5px;
	.card{
		padding: 15px;
		margin-bottom: 5px;
		background-color: #ffffff;
	}
	.con_2{
		padding: 0 15px;
		.otherbtn{
			padding: 15px 0;border-bottom: 1px solid #eeeeee;
		}
	}
	.submitBtn{
		padding: 12px 0;margin:50px 15px;border-radius: 30px;text-align: center;
		background-color: #FFFFFF;
	}
	
	
}

</style>
